﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WintellogMvvm.Common">
    <DataTemplate x:Key="Blog250x250ItemTemplate">
        <Grid HorizontalAlignment="Left" Width="250" Height="250">
            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                <Image Stretch="UniformToFill" Opacity="0.3">
                    <Image.Source>
                        <BitmapImage UriSource="{Binding DefaultImageUri}"/>
                    </Image.Source>
                </Image>
            </Border>
            <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">
                <TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/>
                <TextBlock Text="{Binding PostDate}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/>
            </StackPanel>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="Blog500x130ItemTemplate">
        <Grid Height="110" Width="480" Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
                <Image Stretch="UniformToFill">
                    <Image.Source>
                        <BitmapImage UriSource="{Binding DefaultImageUri}"/>
                    </Image.Source>
                </Image>
            </Border>
            <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
                <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
                <TextBlock Text="{Binding PostDate}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
                <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
            </StackPanel>
        </Grid>
    </DataTemplate>    
    <DataTemplate x:Key="Blog80ItemTemplate">
        <Grid Margin="6">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="60" Height="60">
                <Image Stretch="UniformToFill">
                    <Image.Source>
                        <BitmapImage UriSource="{Binding DefaultImageUri}"/>
                    </Image.Source>
                </Image>
            </Border>
            <StackPanel Grid.Column="1" Margin="10,0,0,0">
                <TextBlock Text="{Binding Title}" Style="{StaticResource ItemTextStyle}" MaxHeight="40"/>
                <TextBlock Text="{Binding PostDate}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>                
            </StackPanel>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="SemanticZoomTemplate">
        <StackPanel Width="300" Margin="0,4,14,0" DataContext="{Binding Group}">
            <TextBlock Text="{Binding Title}" Style="{StaticResource SubheaderTextStyle}"/>          
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Total Items: " Style="{StaticResource TitleTextStyle}" MaxHeight="60"/>
                <TextBlock Text="{Binding ItemCount}" Style="{StaticResource TitleTextStyle}" MaxHeight="60"
                                   Margin="10 0 0 0"/>
                <TextBlock Text="New Items: " Style="{StaticResource TitleTextStyle}" FontWeight="Bold" MaxHeight="60"
                                   Margin="10 0 0 0"/>
                <TextBlock Text="{Binding NewItemCount}" Style="{StaticResource TitleTextStyle}" 
                                   FontWeight="Bold"
                                   MaxHeight="60"
                                   Margin="10 0 0 0"/>

            </StackPanel>
            <Image Height="300" Margin="0,12,18,20" Stretch="UniformToFill">
                <Image.Source>
                    <BitmapImage UriSource="{Binding Items[0].DefaultImageUri}"/>
                </Image.Source>
            </Image>            
        </StackPanel>
    </DataTemplate>
</ResourceDictionary>
